import {
	http
} from '../request/index.js';

// 登陆
export const authlogin = (params) => {
	return http.post('https://imcnpe.knew-how.com/api/v1/auth/login', params);
}

// 聊天用户列表接口
export const talklist = (params) => {
	return http.get('https://imcnpe.knew-how.com/api/v1/talk/list', params);
}

// 发送聊天消息
export const messagetext = (params) => {
	return http.post('https://imcnpe.knew-how.com/api/v1/talk/message/text', params);
}

// 聊天详细记录
export const records = (params) => {
	return http.get('https://imcnpe.knew-how.com/api/v1/talk/records?talk_type=1&receiver_id=21&limit=30&record_id=0', params);
}

// 用户添加老师好友
export const createByUser = (params) => {
	return http.post('https://imcnpe.knew-how.com/api/v1/talk/createByUser', params);
}

// 后端注册同步IM用户
export const sysRegister = (params) => {
	return http.post('https://imcnpe.knew-how.com/api/v1/auth/sysRegister', params);
}
